//
//  BannarCell.m
//  BannarPic
//
//  Created by dllo on 16/2/24.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "BannarCell.h"
#import "UIImageView+WebCache.h"

@interface BannarCell ()
@property(nonatomic,strong)UIImageView *myImageView;

@end
@implementation BannarCell
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.myImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_myImageView];
    }
    return self;
}
- (void)setListModel:(MZY_HomePageModel *)listModel{
    if (_listModel != listModel) {
        _listModel = listModel;
        [_myImageView sd_setImageWithURL:[NSURL URLWithString:_listModel.pic]];
    }
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes{
    self.myImageView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    
}
@end
